﻿using EMS.system.Entityies.MasterData.MaterialTypeModel;
using EMS.system.IEntityAppService.MasterData.MaterialTypeIService.MaterialTypeDTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Dynamic.Core;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories;

namespace EMS.system.IEntityAppService.MasterData.MaterialTypeIService
{
    /// <summary>
    /// 物料类型服务接口
    /// </summary>
    public interface IMaterialTypeAppService : IApplicationService
    {
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<int> MaterialTypeInsert(MaterialTypeInsertDTO model);


        /// <summary>
        /// 物料类型查询
        /// </summary>
        /// <param name="materialTypeName"></param>
        /// <param name="page"></param>
        /// <param name="limit"></param>
        /// <returns></returns>
        Task<List<MaterialTypeSelectDTO>> GetMaterialType();


        /// <summary>
        /// 获取子级物料类型
        /// </summary>
        /// <param name="materialTypeName"></param>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<List<MaterialTypeSelectDTO>> GetMaterialType(List<MaterialType> materialTypeList, int id);

        /// <summary>
        /// 获取所有数据
        /// </summary>
        /// <returns></returns>
        Task<List<MaterialType>> GetAll();

        /// <summary>
        /// 物料类型删除
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        Task<int> MaterialTypeDelete(int Id);

        /// <summary>
        /// 获取单个物料类型
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        Task<MaterialType> GetSingMaterialType(int id);

        /// <summary>
        /// 物料类型编辑
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<int> MaterialTypeUpdate(MaterialTypeUpdateDTO model);
    }
}
